<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<include file="Public/header" />
</head>
<body>
<script type="text/javascript">
	
	var confirmEditmaterialscrapUrl="{:U('Product/confirm_editmaterialscrap')}";//确认上架
	var materialscrappushUrl="{:U('Pushapi/materialscrap')}";//推送库存信息
	var materialscrapInfoUrl="{:U('Order/confirm_arrival')}"//详情链接
	var getgoodslistUrl="{:U('Stock/get_goodslist')}";//商品库存列表
	<!-- using('../../../default/js/materialscrap.js'); -->
	<!-- using('../../../Common/easyui/js/jquery.easyui.patch.js'); -->
	(function($){
            $.fn.numberbox.defaults.filter = function(e){
                var opts = $(this).numberbox('options');
                var s = $(this).numberbox('getText');
                if (e.which == 45){    //-
                    return (s.indexOf('-') == -1 ? true : false);
                }
                var c = String.fromCharCode(e.which);
                if (c == opts.decimalSeparator){
                    return (s.indexOf(c) == -1 ? true : false);
                } else if (c == opts.groupSeparator){
                    return true;
                } else if ((e.which >= 48 && e.which <= 57 && e.ctrlKey == false && e.shiftKey == false) || e.which == 0 || e.which == 8) {
                    return true;
                } else if (e.ctrlKey == true && (e.which == 99 || e.which == 118)) {
                    return true;
                } else {
                    return false;
                }
            }
        })(jQuery);
</script>
<script type="text/javascript" src="__PUBLIC__/default/js/materialscrap.js"></script>
<script type="text/javascript" src="__PUBLIC__/Common/easyui/js/jquery.easyui.patch.js"></script>

	<table id="materialscrapDatagrid" toolbar="#materialscrap_tb"></table>
    <!-- 搜索栏 -->
    <div id="materialscrap_tb">
        <form id="materialscrapSearchForm" method="post" novalidate>
             <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon icon-all" plain="true" onclick="materialscrapObj.showAll()">全部</a>     
            商品编码:<input class="easyui-textbox" name="goods_no" style="width:150px;height:30px;"> 
			商品名称:<input class="easyui-textbox" name="goods_name" style="width:150px;height:30px;"> 
			条形码:<input class="easyui-textbox" name="bar_code" style="width:150px;height:30px;">
			<a href="#" class="easyui-linkbutton searchBar" iconCls="icon-search" style="height:30px;">搜索</a>
        </form>
		<a href="javascript:void(0)" onclick="materialscrapObj.editBar()" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">编辑</a>
		<a href="javascript:void(0)" onclick="materialscrapObj.reloadBar()" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true">刷新</a>
		<a href="javascript:void(0)" onclick="materialscrapObj.saveBar()" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true">保存</a>
    </div>
    <!-- /搜索栏 -->
	<!-- 编辑-->
    <div id="materialscrapEditDialog" class="easyui-dialog" style="width:400px;padding:10px 20px"
            closed="true" buttons="#materialscrapEditButtons"  modal="true">
        <form id="materialscrapEditForm" method="post" novalidate>          
            <div class="fitem">
                <label>损耗单价</label>
                <input name="id" type="hidden" />
                <input name="material_price" class="easyui-textbox" data-options="height:30" />
            </div>
            
			<div class="fitem">
                <label>边角料单价</label>
                <input name="scrap_price" class="easyui-textbox" data-options="height:30" />
            </div>
        </form>
    </div>
    <div id="materialscrapEditButtons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="materialscrapObj.save('{:U('Product/confirm_editmaterialscrap')}')" style="width:90px">确认</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:
    $('#materialscrapEditDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /编辑 -->  
</body>